<?php
/*
*All rights reserved: Json.
*Links:http://www.liyaoquan.cn.
*Links:http://imarkchina.cn.
*Links:http://www.imarkchina.cn.
*/

/**
 * 博客前台搜索控制器，负责，业务流程判断
 */
Class SearchAction extends Action{

	/**
	 * 搜索
	 * @return [type] [description]
	 */
	Public function s(){
		if (ISPOST) {
			$posts = trim(G('post.s'));
			if (empty($posts)) {
				$this->error('Shit, 空的怎么搜?');
			}
		}
		$id = G('s');
		$M = M('Search')->getFileIds($id);
		$this->assign('id', $id);
		$this->assign('sfile', $M['sfile']);
		$this->assign('page', $M['page']);
		$this->display();
	}
}